<?php
class entitybase
{
    protected $id;
    //protected $ver;
    protected $isinsert = false;
    protected $isupdate = false;
    protected $isdelete = false;

    public function __construct($args=array())
    {
        if(false == isset($args['entity_onload']))
        {
            $this->isinsert = true;
        }
    
    }

    public function __set($property, $value)
    {
        if( $this->$property === $value)
        {
        }
        else
        {
            $this->$property = $value;
            $this->isupdate = true;
        }
    }

    public function __get($property)
    {
        return $this->$property;
    }

    public function remove()
    {
        $this->isdelete = true;
    }

}
